package com.taoyibao.hongcanting.ui.mine.delegate;

import android.text.TextUtils;
import android.widget.EditText;
import android.widget.TextView;

import com.taoyibao.hongcanting.R;
import com.taoyibao.hongcanting.base.delegate.BackToolbarDelegate;
import com.taoyibao.hongcanting.cache.SpUtils;
import com.taoyibao.hongcanting.utils.CodeUtils;

/**
 * @author TangAnna
 * @description:
 * @date :${DATA} 16:30
 */
public class SetPayPwdStepOneDelegate extends BackToolbarDelegate {
    @Override
    public int getRootLayoutId() {
        return R.layout.activity_set_pay_pwd_step1;
    }

    @Override
    public void initWidget() {
        super.initWidget();
        setTitle("设置支付密码");
        //手机号
        if (!TextUtils.isEmpty(SpUtils.getUserPhone())) {
            ((TextView) get(R.id.tv_setPayPwd_phone)).setText(CodeUtils.formatHintPhone(SpUtils.getUserPhone()));
        }

    }

    /**
     * 获取输入的验证码
     *
     * @return
     */
    public String getVCode() {
        return ((EditText) get(R.id.et_setPayPwd_vcode)).getText().toString().trim();
    }
}
